Skip to content

Release 8.19.0 - render sid and environment on window.dtinfo for RUM (FRONTIER-5760) - #434

Open
frgongora wants to merge 2 commits into
frontierMasterfrom
feat/frontier-5760-rum-primary-tag-values
Open

frgongora wants to merge 2 commits into
frontierMasterfrom
feat/frontier-5760-rum-primary-tag-values

Conversation

@frgongora

@frgongora frgongora commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

Every page served through the shared layout now carries the values of the primary Grail tags on window.dtinfo, next to the existing appName. A per-frontend RUM capture rule (FRONTIER-5761) can then copy them onto user events as event_properties.*. Ships as @fs/react-scripts 8.19.0. That version assumes #433 (8.18.0) merges first; if it doesn't, this PR will be re-bumped.

Global Value Source
window.dtinfo.sid <blueprint>/<system>/<service>, e.g. frontier-africa/beta/africa FS_BLUEPRINT_NAME, FS_SYSTEM_NAME, FS_SERVICE_NAME
window.dtinfo.environment dev | test | prod FS_ENVIRONMENT_NAME, else FS_SYSTEM_NAME mapped int→dev, beta→test, prod→prod
  • The values are derived as @fs/startup 4.4.0 derives them, so RUM events and back-end records carry the same values. Only the FS_* config vars are read, never TARGET_ENV.
  • sid is positional, so it stops at the first missing or malformed segment and is not set when the blueprint is missing. An unmapped system leaves environment unset; an untagged event is better than a mislabelled one.
  • Each global is set only when its value is non-empty. Both sit in the same unconditional block as appName, not behind NODE_ENV or the RUM flag, because capture rules read a plain global.
  • Out of scope: fsetgrp_id (the project group is not on the Heroku deploy path yet, FRONTIER-4446), the capture rules themselves (FRONTIER-5761), and the RUM loading arms in dynatrace.ejs.

Verification

frontier-app-react (@fs/react-scripts 8.17.0 installed) was run with npm start, with the installed layout/views symlinked to this branch. The dev server mounts Snow, so this is the same layout.ejs render path production uses.

Env Rendered
FS_BLUEPRINT_NAME=frontier-app-react FS_SYSTEM_NAME=int window.dtinfo.sid = "frontier-app-react/int", window.dtinfo.environment = "dev"
FS_BLUEPRINT_NAME=frontier-app-react, no system window.dtinfo.sid = "frontier-app-react", no environment
both unset neither line; only appName

For case 1, the browser reads window.dtinfo as {"appName":"frontier-app-react","sid":"frontier-app-react/int","environment":"dev"}.

The repo has no lint script and no local test suite (root npm test is a no-op), so CI's prerelease and scaffold smoke test is the automated check.

Depends on #433

build-and-publish fails at Install, before it reaches anything this PR changes. JFrog curation now returns 403 for websocket-driver-0.7.5.tgz, which frontierMaster pulls in through webpack-dev-server 4. That makes every PR off frontierMaster red, not just this one. #433 (webpack-dev-server 6) drops websocket-driver, and its CI passes.

Merge #433 first, then rebase this branch onto frontierMaster. CI should pass after that, and the 8.19.0 bump here becomes the correct next version.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant